﻿using System.Collections.Generic;
using nanoCMS.Core.Concrete;

namespace nanoCMS.Core.Interfaces
{
    public interface IUserProvider
    {
        Membership.MembershipReturn CheckAndGetUser(string email, string password, out User user);
        Membership.MembershipReturn CheckUser(string email, string password);
        
        Membership.MembershipReturn CreateUser(string email, string password, string username, out User user, bool isActivated = false);
        
        Membership.MembershipReturn CreateUser(string email, string password, string username, string displayName,
                                               out User user, bool isActivated);

        Membership.MembershipReturn ChangeUserPassword(int userId, string newPassword);
        Membership.MembershipReturn EditUserDisplayName(int userId, string displayName);

        Membership.MembershipReturn LogOn(string email, string password, out User user);
        bool IsEmailInUse(string email, int excludeUserID = 0);

        Membership.MembershipReturn GetUser(int userId, out User user);
        Membership.MembershipReturn GetUser(string email, out User user);
        Membership.MembershipReturn ActivateUser(int userId);

        Membership.MembershipReturn BlockUser(int userId, string reason);
        Membership.MembershipReturn UnblockUser(int userId);

        Membership.MembershipReturn LogIn(string email);
        

        List<User> GetUsers(bool? isActivated = null, bool? isBlocked = null);
        bool LogOut();
    }
}
